<template>
	<view>
		<view class="cardShadow u-margin-bottom-20">
			<template>
				<view class="title">
					{{ item[$t('item.goods_name')] || $t("暂无信息") }}
				</view>
				<view class="lineP">
					<view style="flex: 1;">
						<view class="lineP">
							<Tag class="u-margin-bottom-14" :text="item[$t('item.goods_weight')]+'kg'" color="#2b7deb">
							</Tag>
							<Tag class="u-margin-bottom-14" :text="item[$t('item.goods_volume')]+'m³'" color="#ef9b17">
							</Tag>
							<Tag class="u-margin-bottom-14"
								:text="item[$t('item.goods_num')]+item[$t('item.number_unit')]" color="#22ac38"></Tag>
							<Tag class="u-margin-bottom-14" :text="$t(item.whole_diffuse)" color="#13b5b1"></Tag>
						</view>
						<view class="lineP u-margin-bottom-0">
							<FromToCountry :item="item"></FromToCountry>
						</view>
					</view>
					<view class="carPicture">
						<img :src="HTTP_IMG_UTL+'huowuPic.png'" alt="" />
					</view>
				</view>
				<view class="lineP">
					<img :src="HTTP_IMG_UTL+'location.png'" class="headline_img" />
					<!-- <view class="u-flex-1">{{item.departurecitys[$t('item.city.mergename')] || $t("暂无信息")}}</view> -->
					<view class="u-flex-1">{{item.hyd || $t("暂无信息") }}</view>
				</view>
				<view class="lineP">
					<img :src="HTTP_IMG_UTL+'transportIcon1.png'" class="headline_img" />
					<!-- <view class="u-flex-1">{{item.reachcitys[$t('item.city.mergename')] || $t("暂无信息") }}</view> -->
					<view class="u-flex-1">{{item.shd || $t("暂无信息") }}</view>
				</view>
				<!-- <view class="u-margin-bottom-20">
					<TransportType :item="item"></TransportType>
				</view> -->
			</template>
		</view>
		<view class="cardShadow">
			<view>
				<ProductWHL :item="item" :type="type"></ProductWHL>
			</view>
			<view class="u-border-bottom u-margin-bottom-20"></view>
			<view class="u-margin-bottom-20">
				<TransportType :item="item"></TransportType>
			</view>
		</view>
	</view>
</template>

<script>
	import TransportType from '@/components/TransportType.vue'
	import ProductWHL from '@/components/ProductWHL.vue'
	
	import {
		createC2CConversation,
		isBase64,
		time
	} from "@/common/public";
	import FromToCountry from '@/components/FromToCountry.vue'

	import Tag from '@/components/Tag.vue'
	import {
		IMAGE_URL,
		HTTP_IMG_UTL
	} from "@/config/app";
	export default {
		components: {
			Tag,
			FromToCountry,
			TransportType,
			ProductWHL
		},
		props: {
			item: {
				type: Object,
				default: {},
			},
			type: {
				type: String,
				default: '1',
			},
		},
		computed: {
			toImages() {
				return (src) => {
					return isBase64(src) ? src : IMAGE_URL + src
				}
			},
		},
		data() {
			return {
				HTTP_IMG_UTL
			};
		},
		methods: {
			time
		}
	}
</script>

<style lang="scss" scoped>
	.carPicture {
		bottom: 210rpx;
		right: 20rpx;

		img {
			height: 160rpx;
			width: 180rpx;
		}
	}

	.lineP {
		display: flex;
		align-items: center;
		margin-bottom: 8px;
		position: relative;
		font-size: 16px;
		position: relative;
		flex-wrap: wrap;

		.tag {
			margin-top: 20rpx;
		}

		&.shot {
			width: 48%;
			flex-wrap: wrap;


		}



		.headline_img {
			width: 30rpx;
			height: 30rpx;
			margin-right: 10rpx;
		}

		.label {
			font-weight: 600;
			margin-bottom: 10rpx;
		}
	}

	.title {
		color: #e43b14;
		text-align: center;
		font-size: 38rpx;
		font-weight: 600;
		margin-top: 10rpx;
		word-break: break-all;
		min-height: 80rpx;
		margin-bottom: 20rpx;
	}
</style>